from gym import models
from core import signals
from django.db import DEFAULT_DB_ALIAS
from django.db.models.signals import post_syncdb

MENUS = {
    "Student": 1,
    "Teacher": 2,
    "Employee": 3,
    "Activity": 4,
    "Registration Form Model": 5,
    "Product": 6,
}


def core_post_signal_handler(app, db=DEFAULT_DB_ALIAS, **kwargs):
    signals.create_permissions(app, db, MENUS, **kwargs)
    signals.fixtures_loaded = True

post_syncdb.connect(core_post_signal_handler, sender=models, weak=False)

